<div class="containerright">
    <!--left-->
    <div class="videosnavleft">
        <?php
        $noborder = "";
        foreach ($videosnewwidget as $key => $listvideosleft) {
            if ($key < 3) {
                if ($key == 2) {
                    $noborder = "noborder";
                }
                $title = $listvideosleft["videoName"];
                $img = WEB_PATH . "/public/" . $listvideosleft["videoImgThumb"];
                $linkvideos = WEB_PATH . "/" . $listvideosleft["catalogLink"] . "/" . $listvideosleft["videoLink"] . ".html";
                //chay 3 video trai truoc.
                echo '<div class="videossub ' . $noborder . '">'
                . '<a href="' . $linkvideos . '" title="' . $title . '"><img class="img-responsive" src="' . $img . '" alt="' . $title . '"/></a>'
                . '<div class="captitle">'
                . '<a href="' . $linkvideos . '" title="' . $title . '">' . $title . '</a>'
                . '</div>'
                . '</div>';
            }
        }
        ?>

    </div>
    <!--/left-->
    <!--right-->
    <div class="videosnavright">
        <div class="advindextop">
            <center>
                <?php
                $filename = str_replace("\\", "/", APPLICATION_PATH) . "/public/codeadv/listvideos/topadv.txt";
                $advct = file_get_contents($filename, true);
                echo $advct;
                ?>
            </center>
        </div>
        <?php
        $noborder = "";
        foreach ($videosnewwidget as $key => $listvideosleft) {
            if ($key > 2 && $key < 5) {
                if ($key == 4) {
                    $noborder = "marginright";
                }
                $title = $listvideosleft["videoName"];
                $img = WEB_PATH . "/public/" . $listvideosleft["videoImgThumb"];
                $linkvideos = WEB_PATH . "/" . $listvideosleft["catalogLink"] . "/" . $listvideosleft["videoLink"] . ".html";
                //chay 3 video trai truoc.
                echo '<div class="videossub_adv ' . $noborder . '">'
                . '<a href="' . $linkvideos . '" title=""><img class="img-responsive" src="' . $img . '" alt="' . $title . '"/></a>'
                . '<div class="captitle">'
                . '<a href="' . $linkvideos . '" title="' . $title . '">' . $title . '</a>'
                . '</div>'
                . '</div>';
            }
        }
        ?>
    </div>
    <!--/right-->
</div>